<%inherit file="base.html" />
<h2>Add Subproject</h2>
% if errors:
	<ul>
	% for error in errors:
		<li>${ error }
	% endfor
	</ul>
% endif
<form method="post">
	<div class="form_row">
		<label for="project_id">Pivotal Project ID: </label><input id="project_id" name="project_id" type="text" value="${ project_id or '' }" />
	</div>
	<div class="form_row">
		<label for="label">Team Name: </label><input id="label" name="label" type="text" value="${ label or '' }" />
	</div>
	<div class="form_row">
		<label for="integration_name">Integration Name: </label><input id="integration_name" type="text" name="integration_name" value="${ integration_name or 'MasterControl' }" />
	</div>
	<div class="form_row">
		<label for="owner">Story Owner Name: </label>
		% if members:
			<select id="owner" name="owner">
			% for member in members:
				<option value="${ member }">${ member }</option>
			% endfor
			</select>
		% else:
			<input id="owner" name="owner" value="${ owner or '' }" />
		% endif
	</div>
	<div class="form_row">
		<label for="token">Pivotal API Token: </label><input id="token" name="token" type="text" value="${ token or '' }"/>
	</div>
	or
	<div class="form_row">
		<label for="pivotal_username">Pivotal Username: </label><input id="pivotal_username" name="pivotal_username" type="text" value="${ username or '' }" />
	</div>
	<div class="form_row">
		<label for="pivotal_password">Pivotal Password: </label><input id="pivotal_password" name="pivotal_password" type="password" />
	</div>
	<input type="submit" value="Save" class="button add_button" />
    <input type="button" class="button cancel_button" value="Cancel" onclick="window.location='/secure/${ project.key().id_or_name() }/'" />
</form>
